package com.whfc.iot.mach.entity;

import com.whfc.iot.mach.constant.MsgConst;
import lombok.Data;

/**
 * 硬件下行开关机指令
 */
@Data
public class MachMsg0x8B extends MachMsg {

    /**
     * 0x00-停机 ,0x01-工作
     */
    private int subCmd;

    /**
     * 速度
     */
    private double speed;

    public MachMsg0x8B() {
        this.setCmd(MsgConst.DOWNSTREAM_CMD_0x8B);
    }

    public MachMsg0x8B(int subCmd) {
        this.setCmd(MsgConst.DOWNSTREAM_CMD_0x8B);
        this.subCmd = subCmd;
    }

    @Override
    public int getDataLength() {
        return 3;
    }
}
